package com.design.pattern.signleton;

public class Signleton2 {

    private volatile static Signleton2 signleton2;

    private Signleton2() {

    }

    public static Signleton2 getInstance() {
        if (null == signleton2) {
            synchronized (Signleton2.class) {
                if (null == signleton2) {
                    signleton2 = new Signleton2();
                }
            }
        }
        return signleton2;
    }

}